import request from '@/utils/request.js'

// 任务列表
export const getlisttask = (params) => {
    return request({
        url: '/task/list',
        method: 'get',
        params: params
    })
}
// 创建任务
export const getcreatetask = (params) => {
    return request({
        url: '/task/create',
        method: 'get',
        params: params
    })
}
// 获取Excel模板(接口成功200但是没有返回0状态码)
export const getexceltemplate = () => {
    return request({
        url: '/task/get_excel_template',
        method: 'get',
        headers:{'Content-Type':'application/json'},
        responseType: 'blob',
        // params: params
    })
}
 // 批量导入手机号(存疑)
 export const transitionUpload = (data) => {
    return request({
        url: `/task/${data.id}/batch_add_mobile`,
        method: 'post',
        headers: { 'Content-Type': 'multipart/form-data' },
        responseType: 'blob',
        data: data
    })
}